package com.ebc.eservice.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ebc.eservice.pojo.EbcCompany;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ebc.eservice.pojo.EbcUserRole;
import com.ebc.eservice.vo.admin.CompanyAccountRespVo;
import com.ebc.eservice.vo.user.UserListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * <p>
 * 公司信息表 Mapper 接口
 * </p>
 *
 * @author joey
 * @since 2022-09-17
 */
@Mapper
public interface CompanyMapper extends BaseMapper<EbcCompany> {

    IPage<CompanyAccountRespVo> getCompanyAccountList(Page<CompanyAccountRespVo> page);
//     @Param(Constants.WRAPPER) Wrapper<EbcUserRole> wrapper

    @Update("update ebc_company set open = 1 where id = #{cid} ")
    void ModifyOpen(Integer cid);

    @Update("update ebc_company set open = 0 where id = #{cid} ")
    void ModifyClose(Integer cid);


}
